<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>公告管理</title>
    <div th:replace="common_cssjs"></div>
    <script th:src="@{/js/news.js}" type="text/javascript"></script>
</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <div th:replace="common/adminNav::admin"></div>
    <div class="row">
        <div id="addNewsSuccess" style="display: none" class="alert alert-success">添加成功</div>
        <table class="table table-responsive table-striped">
            <thead>
            <tr>
                <td>日期</td>
                <td>公告标题</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            <tr th:each="news:${page.result}" th:pid="${news.id}">
                <td th:text="${news.createTime}"></td>
                <td th:text="${news.title}"></td>
                <td><a class="btn btn-info btn-xs">查看</a> <a class="btn btn-info btn-xs">修改 <a
                        class="btn btn-info btn-xs">删除</a></a></td>
            </tr>
            </tbody>
        </table>
        <div class="col-md-6 col-md-offset-3">
            <form id="inputForm" role="form" action="/news/add"
                  method="post" class="form-horizontal">
                <div class="form-group">
                    <label class="col-sm-2 control-label">标题</label>
                    <div class="col-sm-10">
                        <input minlength="6" required class="form-control" type="text" id="title" name="title"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">内容</label>

                    <div class="col-sm-10">
                        <textarea class="form-control" name="content" id="content"></textarea>
                    </div>
                </div>
                <div class="text-center">
                    <button type="button" id="addNewsBtn" class="btn btn-primary">保存</button>
                </div>
            </form>
        </div>

    </div>
    <div class="text-center">
        <!--<tags:pagination page="${page}" paginationSize="${page.pageSize}"/>-->
    </div>
</div>
<!-- /container -->

<div th:replace="common/footer::copy"></div>
</body>
</html>